<?php
/**
 * Created by PhpStorm.
 * User: xutao
 * Date: 2018/8/2
 * Time: 15:21
 */
namespace app\common\validate;
use think\Validate;

class LookValidate extends Validate{
    protected $rule = [
        'src'  =>  'require',
        'date'  =>  'require|date',
        'feel'  =>  'require',
        'country'  =>  'require',
        'province'  =>  'require',
        'city'  =>  'require',
        'spot'  =>  'require',
    ];
    protected $message  =   [
        'src.require'=>'封面图不能为空',
        'date.require'     => '日期不能为空',
        'date.date' => '日期格式为空',
        'feel.require'     => '感想不能为空',
        'country.require'   => '国家不能为空',
        'province.require'   => '省不能为空',
        'city.require'   => '市不能为空',
        'spot.require'   => '景点不能为空',
    ];
}